home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Sun Solutions 1997 April to September
/
Sun Solutions CD - APR '97 - SEP '97 (704-3778-12 Rev. H)(Sun Microsystems, Inc.)(1997).iso
/
products
/
SCO
/
_install
/
su.sh
< prev
Wrap
Linux/UNIX/POSIX Shell Script
|
1997-02-25
|
1KB
|
51 lines
#!/bin/sh
#-----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
echo "
Thank you for choosing to install SCO Software.
"
#
# Check if root
#
if [ "$USER" = "root" ]; then
while true
do
echo "Would you like to Continue install or Quit ? [y/q] \c"
read ans
case "$ans" in
y|Y|yes|YES) exec $COMPANY_DIR/_install/install;exit 0
;;
N|Q|n|q|No|quit|NO|QUIT|Quit) echo;echo;echo " cancelling installation"; sleep 5 ; exit 1
;;
* ) echo ; echo ; echo "Please answer with y if you wish to install,"
echo " or q if you wish to quit (stop the install)"
;;
esac
done
else
while true
do
echo "You need to be super user to install this software. \c"
echo ""
echo "Would you like to Continue install, or Quit ? [y/q] \c"
read ans
case "$ans" in
y|Y|yes|YES) echo "";echo "Enter super user \c";su root -c '$COMPANY_DIR/_install/install';exit 0
;;
N|Q|n|q|No|quit|NO|QUIT|Quit) echo;echo;echo " cancelling installation"; sleep 5 ; exit 1
;;
* ) echo ; echo ; echo "Please answer with y if you wish to install,"
echo " or q if you wish to quit (stop the install)"
;;
esac
done
fi